package com.woniu.userassembly.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.ly.model.model.Traveler;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TravelerMapper extends BaseMapper<Traveler> {
  @Select("select count(traveler_id) from t_traveler where user_id=#{userId}")
    int travelerCount(int userId);
@Select("select * from t_traveler where user_id=#{userId} limit #{i},#{pageNum}")
    List<Traveler> selectTraveler(@Param("userId") int userId, @Param("i") int i,@Param("pageNum") int pageNum);
@Select("select traveler_id from t_traveler where user_id=#{userId}")
    List<Integer> selectTravelerByUserId(int userId);
}
